package com.ruoyi.bussiness.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bussiness.mapper.TraLessonMapper;
import com.ruoyi.bussiness.domain.TraLesson;
import com.ruoyi.bussiness.service.ITraLessonService;
import com.ruoyi.common.core.text.Convert;

/**
 * 培训课时Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-12
 */
@Service
public class TraLessonServiceImpl implements ITraLessonService 
{
    @Autowired
    private TraLessonMapper traLessonMapper;

    /**
     * 查询培训课时
     * 
     * @param id 培训课时主键
     * @return 培训课时
     */
    @Override
    public TraLesson selectTraLessonById(Long id)
    {
        return traLessonMapper.selectTraLessonById(id);
    }

    /**
     * 查询培训课时列表
     * 
     * @param traLesson 培训课时
     * @return 培训课时
     */
    @Override
    public List<TraLesson> selectTraLessonList(TraLesson traLesson)
    {
        return traLessonMapper.selectTraLessonList(traLesson);
    }

    /**
     * 新增培训课时
     * 
     * @param traLesson 培训课时
     * @return 结果
     */
    @Override
    public int insertTraLesson(TraLesson traLesson)
    {
        return traLessonMapper.insertTraLesson(traLesson);
    }

    /**
     * 修改培训课时
     * 
     * @param traLesson 培训课时
     * @return 结果
     */
    @Override
    public int updateTraLesson(TraLesson traLesson)
    {
        return traLessonMapper.updateTraLesson(traLesson);
    }

    /**
     * 批量删除培训课时
     * 
     * @param ids 需要删除的培训课时主键
     * @return 结果
     */
    @Override
    public int deleteTraLessonByIds(String ids)
    {
        return traLessonMapper.deleteTraLessonByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除培训课时信息
     * 
     * @param id 培训课时主键
     * @return 结果
     */
    @Override
    public int deleteTraLessonById(Long id)
    {
        return traLessonMapper.deleteTraLessonById(id);
    }
}
